<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="128dp"
    app:cardCornerRadius="4dp"
    app:cardElevation="4dp"
    app:cardUseCompatPadding="true"
    app:contentPadding="2dp">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/imgConnectionStatus"
            android:layout_width="24dp"
            android:layout_height="24dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/ic_mpd_disconnected_24dp" />

        <TextView
            android:id="@+id/textViewMPDName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            app:layout_constraintEnd_toStartOf="@id/buttonMore"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintStart_toEndOf="@+id/imgConnectionStatus"
            app:layout_constraintTop_toTopOf="parent" />

        <ImageButton
            android:id="@+id/buttonMore"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/image_button_more"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/ic_more" />

        <ImageButton
            android:id="@+id/buttonStop"
            android:layout_width="64dp"
            android:layout_height="64dp"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/detail_stop"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@id/buttonPlay"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/ic_stop" />

        <ImageButton
            android:id="@+id/buttonPlay"
            android:layout_width="64dp"
            android:layout_height="64dp"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/detail_play"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/buttonStop"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/ic_play_circle" />

        <TextView
            android:id="@+id/textViewNoConnection"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginEnd="8dp"
            android:layout_marginRight="8dp"
            android:minWidth="48dp"
            android:text="@string/mpd_no_connection"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/textViewMPDVolume"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="@id/buttonMPDDecreaseVolume"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@id/buttonMPDIncreaseVolume"
            tools:text="100%" />

        <ImageButton
            android:id="@+id/buttonMPDDecreaseVolume"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/detail_play"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/buttonMPDIncreaseVolume"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintHorizontal_weight="1"
            app:layout_constraintStart_toStartOf="parent"
            app:srcCompat="@drawable/ic_volume_down_24dp" />

        <ImageButton
            android:id="@+id/buttonMPDIncreaseVolume"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/detail_play"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintHorizontal_weight="1"
            app:layout_constraintStart_toEndOf="@id/buttonMPDDecreaseVolume"
            app:srcCompat="@drawable/ic_volume_up_24dp" />


    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>